package com.example.springboot_c.Mapper;
import com.example.springboot_c.pojo.ProductCategory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface ProductCategoryMapper {
    @Select("SELECT * FROM product_category")
    List<ProductCategory> findAll();

    @Insert("INSERT INTO product_category(name, description) VALUES(#{name}, #{description})")
    int insert(ProductCategory category);
}